<?php
$this->breadcrumbs = array(
    'Login' => TreTodayUrl::backendLoginUrl()
);
?>
<?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'loginForm',
    'enableClientValidation' => true,
    'method' => 'POST',
    'clientOptions' => array(
        'errorCssClass' => 'has-error',
        'validateOnSubmit' => true,
    ),
    'htmlOptions' => array(
        'role' => 'form',
        'class' => 'form-horizontal'
    )
)); ?>
<fieldset>
    <legend>
        <h1>Đăng nhập</h1>
    </legend>
    <?php if ($model->getErrors()) {
        ?>
        <div class="alert alert-error">
            <?php echo $form->errorSummary($model); ?>
        </div>
    <?php } ?>
    <div id="content">
        <table>
            <tr>
                <td style="width:130px">
                    <?php echo $form->labelEx($model, 'username', array('class' => 'control-label')); ?>
                </td>
                <td>
                    <?php echo $form->textField($model, 'username', array('size' => 60, 'maxlength' => 255, 'class' => 'textbox')); ?>
                </td>
            </tr>
            <tr>
                <td><?php echo $form->labelEx($model, 'password', array('class' => 'control-label')); ?></td>
                <td> <?php echo $form->passwordField($model, 'password', array('size' => 60, 'maxlength' => 255, 'class' => 'textbox')); ?></td>
            </tr>
            <tr>
                <td>
                    <?php echo $form->labelEx($model, 'rememberMe', array('class' => 'control-label')); ?>
                </td>
                <td>
                    <?php echo $form->checkBox($model, 'rememberMe'); ?>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    Nếu bạn chưa có tài khoản click
                    <a style="font-weight: bold;font-size: 13px"
                       href="<?php echo TreTodayUrl::getRegisterUrl() ?>"> Đăng kí
                    </a>
                    để tạo.
                </td>
            </tr>

            <tr>
                <td></td>
                <td>    <?php echo CHtml::submitButton('Đăng nhập', array('class' => 'btn btn-default')); ?></td>
            </tr>
        </table>
    </div>

</fieldset>

<?php $this->endWidget(); ?>
